package com.filetransfer.api.upload;
import com.filetransfer.api.upload.ProgressInfo;
import lombok.Data;
@Data
public class ProgressStatus {
    public ProgressStatus(long chunkCount, long totalContentLength) {
        this.chunkCount = chunkCount;
        this.totalContentLength = totalContentLength;
    }
    public int currentChunkIndex = 0;
    public long totalBytesWritten = 0L;
    public long chunkCount;
    public long totalContentLength;
    public long workingChunkBytesWritten = 0L;
    public long workingChunkSize = 0L;
    public ProgressInfo getProgressInfo() {
//        log.info("totalBytesWritten: {}, totalContentLength: {}, chunkCount: {}, currentChunkIndex: {}, workingChunkBytesWritten: {}, workingChunkSize: {}", totalBytesWritten, totalContentLength, chunkCount, currentChunkIndex, workingChunkBytesWritten, workingChunkSize);
        return new ProgressInfo(totalBytesWritten + workingChunkBytesWritten, totalContentLength, chunkCount, currentChunkIndex, workingChunkBytesWritten, workingChunkSize);
    }
}